package netmorph.model.parts;

import netmorph.model.NetmorphModel;

public class TuftSPart extends NetmorphModelBESPart {

	public TuftSPart(BESInputModel input, BESOutputModel output, NetmorphModel model) 
	{
		super(input, output, model);
	}

	@Override
	public void init() {
		x = new double[]{ input.getTuftS() };
		y = new double[1];
		yt = new double[] { output.getTargetTAsymMean() };
	}

	@Override
	public void setParameters() {
		input.setTuftS(x[0]);
	}

	@Override
	public void modelComputed(NetmorphModel model) {
		double asym = model.getLastStats().tuftAsymIndexDist().mean();
		y = new double[] { asym };
	}
	
	@Override
	public boolean isDone() {
		return true;
	}

	@Override
	public String getName() {
		return "ApicalS";
	}
}
